#!D:\Python27\python.exe
# -*- coding: utf-8 -*-
'''
    Get User Infomation Request Command

    :copyright: (c) 2014 by Duxin.
'''

import cgi

import command
import app
import sessions

class UserInfo(command.Command):
    def is_param_right(self):  
        pass  

    def execute(self):
        session = self.get_session()
        
        user = session.get_attribute('user')
       
        if user:
            return "{username:'%s',avatar:'%s'}"%(user.username,  user.get_avatar_url())
        else:
            return "error_会话已过期"

app.App.start(UserInfo())
